package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Scanner;

public class InputStreamDemo3 {
    public static void main(String[] args) {
        try(FileInputStream inputStream=new FileInputStream("c.txt")) {
            try(Scanner sc=new Scanner(inputStream,"utf-8")){
                while(sc.hasNext()){
                    System.out.println(sc.nextLine());
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
